package com.buydeem.share.springtxpropagation.controller;

import com.buydeem.share.springtxpropagation.service.AuthorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zengchao
 * @version 1.0.0
 * @ClassName TestController.java
 * @Description TODO
 * @createTime 2021年06月21日 20:11:00
 */
@RestController
@RequestMapping("test")
public class TestController {
    @Autowired
    private AuthorService authorService;

    @GetMapping("/1")
    public Object test1(){
        authorService.addAuthor1();
        return "ok";
    }

    @GetMapping("/2")
    public Object test2(){
        authorService.addAuthor2();
        return "ok";
    }

    @GetMapping("/3")
    public Object test3(){
        authorService.addAuthor3();
        return "ok";
    }

    @GetMapping("/4")
    public Object test4(){
        authorService.addAuthor4();
        return "ok";
    }

    @GetMapping("/5")
    public Object test5(){
        authorService.addAuthor5();
        return "ok";
    }

    @GetMapping("/6")
    public Object test6(){
        authorService.addAuthor6();
        return "ok";
    }

    @GetMapping("/7")
    public Object test7(){
        authorService.addAuthor7();
        return "ok";
    }

    @GetMapping("/8")
    public Object test8(){
        authorService.addAuthor8();
        return "ok";
    }

    @GetMapping("/10")
    public Object test10(){
        authorService.addAuthor10();
        return "ok";
    }

    @GetMapping("/11")
    public Object test11(){
        authorService.addAuthor11();
        return "ok";
    }

    @GetMapping("/12")
    public Object test12(){
        authorService.addAuthor12();
        return "ok";
    }

}
